import request from '@/utils/request'
import axios from 'axios';

// 获取报告列表
export function reportLists(query) {
    return request({
      url: '/fxfzaqbz/report/getAll',
      method: 'get',
      params:query
    })
  }

// 删除报告
export function delReport(id) {
  return request({
    url: '/fxfzaqbz/report/delete/' + id,
    method: 'get'
  })
}

// 生成报告
export function reportCreat(data, cancel) {
  return request({
    url: '/fxfzaqbz/report/createReport',
    method: "post",
    data: data,
    cancelToken: new axios.CancelToken(function executor(c) {
      cancel.c = c;
    })
  });
}

// 提交报告
export function submitReport(data) {
  return request({
    url: '/fxfzaqbz/report/submit',
    method: "post",
    data: data,
  });
}  

// 提交检查
export function submitCheck(data) {
  return request({
    url: '/fxfzaqbz/report/check',
    method: "post",
    data: data,
  });
}  

// 获取所有报告模版
export function getRtTypeAll(rtType) {
  return request({
    url: '/fxfzaqbz/data/getList/' + rtType,
    method: 'get'
  })
}